package com.chengxiaoxiao.service.impl;

import com.chengxiaoxiao.commons.Page;
import com.chengxiaoxiao.dao.CategoryDao;
import com.chengxiaoxiao.dao.impl.CategoryDaoImpl;
import com.chengxiaoxiao.domain.Category;
import com.chengxiaoxiao.service.CategoryService;

import java.util.List;

public class CategoryServiceImpl implements CategoryService {
    private CategoryDao dao = new CategoryDaoImpl();

    @Override
    public void add(Category category) {
        dao.add(category);
    }

    @Override
    public void update(Category category) {
        dao.update(category);
    }

    @Override
    public void delete(long id) {
        dao.delete(id);
    }

    @Override
    public List get() {
        return dao.get();
    }

    @Override
    public Category getbyId(long id) {
        return dao.getbyId(id);
    }

    @Override
    public Page getListPage(String num) {
        return null;
    }

    @Override
    public List<Category> getCatrgoryBooks() {
        return dao.getCategoryBooks();
    }
}
